import React from 'react'
import { Layout } from 'antd'
import { connect } from 'dva'
import { withRouter } from 'dva/router'
import SMenu from '@/components/custom/Menu'

const { Sider } = Layout
const MSider = ({ app, location }) => {
  return (
    <Sider
        trigger={null}
        collapsible
        collapsed={app.collapsed}
      >
        <SMenu location={location}/>
      </Sider>
  )
}

export default withRouter(connect(({ app }) => ({ app }))(MSider))
